DDR Configuration

Create a Vivado Project

Open Vivado and click Create Project.

Select a project name and path, then click Next.

Select RTL Project (check Do not specify sources at this time), then click Next.

Select the correct FPGA model (e.g., xc7z020clg400-2), then click NextFinish.


Add the Zynq Processing System IP

In the Flow Navigator, click Create Block Design.

On the Block Design canvas, click the “+” button to add an IP, search for “Zynq”, select Zynq7 Processing System, and double-click to add it.

Click Run Block Automation (this automatically connects the PS-PL interface; the default settings can be kept).


Configure the DDR Controller

In the Block Design, double-click the Zynq IP to open the configuration interface.

Switch to the DDR Configuration tab:

DDR Controller Configuration

VeryCapture_20250617143724

Memory Part Configuration

The specific configuration is as follows:

image-20250813175251175

The relevant parameters should be filled in by consulting the datasheet:

Training/Board Details

The formula for DQS to Clock Delay (ns) is as follows:

DQStoClockDelay(ns)=PathDelayCLK0PathDelayDQS1000

Where:

Formula Verification:

a. Calculate the path delay for CLK0

LCLK0=30.4 mm
Package DelayCLK0=80.4535 ps
Propagation Delay=160 ps/inch
LCLK0(inch)=30.425.41.1969 inch
Path DelayCLK0=80.4535+(1.1969×160)271.9575 ps

b. Calculate the path delay for DQS0

LDQS0=12.391 mm
Package DelayDQS0=105.056 ps
LDQS0(inch)=12.39125.40.4878 inch
Path DelayDQS0=105.056+(0.4878×160)183.056 ps

 

c. Calculate the DQS0 to Clock Delay

DQS to Clock DelayDQS0=271.9575183.05610000.0889 ns0.089 nsBoardDelay(ns)

d. Calculation for other DQS signals

Similarly, for signals like DQS1, DQS2, etc., simply replace the corresponding L and

Package Delay

values and repeat the steps above.

The formula for Board Delay (ns) is as follows:

Board Delay=Path DelayCLK+Path DelayDQ2×1000

Where:

Formula Verification:

a. First, calculate the path delay for CLK:

b. Then, calculate the path delay for (DQ[0:7]) (using (DQ7:0) as an example):

LDQ7:0=12.391 mm
Package DelayDQ7:0=105.056 ps
PathDelayDQ7:0=PackageDelayDQ7:0+LDQ7:0(inch)×PropagationDelay
PathDelayDQ7:0=105.056+0.4878×160
PathDelayDQ7:0=105.056+78.048
PathDelayDQ7:0=183.104ps

 

c. Calculate (Board\ Delay) using the formula:

Board Delay=Path DelayCLK+Path DelayDQ2×1000
Board Delay=0.22753075 ns0.224 ns

system calculates automatically

Calculated: The system calculates automatically. We obtain the lengths of the DDR net traces from PCB design software (like Altium Designer, Cadence, etc.), enter them into the Length column, and Vivado will automatically calculate the delay time. The interface is as follows:

VeryCapture_20250617155859

Since we have two DDR3 chips, there are two pairs of differential clock signals. CLK0, CLK1, DQS0, and DQS1 are the signals for the first DDR3 chip, where CLK0/CLK1 provide the clock and DQS0/DQS1 control the 16-bit data bus. The same applies to the second DDR3 chip.

VeryCapture_20250617163613

Enable Advanced options

This section can be left at its default settings.

Run the Application in Vitis

Select the template specifically for testing DDR:

VeryCapture_20250620101557

Compile and run the project:

VeryCapture_20250620102934

Display of run results:

img

VeryCapture_20250620102204

VeryCapture_20250620102220

Explanation of Results:

First, an explanation of the "eye diagram":

A DDR eye diagram is a graph formed by overlaying the waveforms of multiple data bits, as observed on an oscilloscope for high-speed serial signals. It is named for its resemblance to an "eye." It is a key tool for evaluating the signal integrity of DDR (Double Data Rate) memory.

Key Parameters

bAnalysis